import request from '@/utils/request'
import Qs from 'qs'

export default{
    //获取关于
    getAbout(){
        return request({
            url: '/web/v1/links/abouts',
            method: 'post'
        })
    },
    //文章
    articlelist(data) {
        return request({
            url: '/web/v1/article/list',
            method: 'post',
            data:data
        })
    },
    //用户文章列表
    articleMemberList(_data){
        return request({
            url:'/web/v1/member/article/list',
            method:'post',
            data:_data
        })
    },
    getChildrenListByParentId(data) {
        return request({
            url: '/web/v1/article/category/getChildrenListByParentId',
            method: 'get',
            params:data
        })
    },
    getCategoryFilter(data) {
        return request({
            url: '/web/v1/article/category/getCategoryFilter',
            method: 'get',
            params:data
        })
    },
    getCategoryForInspiration(_param) {
        return request({
            url: '/web/v1/article/category/getGameCategoryFilter',
            method: 'get',
            params:_param
        })
    },
    //获取推荐关键字
    getNotDataRecommend() {
        return request({
            url: '/web/v1/search/getNotDataRecommend',
            method: 'get',
            params:{}
        })
    },
    //获取热门关键词
    hotWords(data) {
        return request({
            url: '/web/v1/search/history',
            method: 'post',
            data:data
        })
    },
    //获取搜索历史
    historyList(data) {
        return request({
            url: '/web/v1/member/search/list',
            method: 'post',
            data:data
        })
    },
    //获取统计
    getInspirationStatis() {
        return request({
            url: '/web/v1/article/category/statistics/get',
            method: 'get',
            params:{id:67}
        })
    },
    searchImages(data){
        return request({
            url: '/web/v1/article/searchByImages',
            method: 'post',
            data:data
        })
    },
    adList(_data){
        return request({
            url: '/web/v1/ad/list',
            method: 'post',
            data:_data
        })
    },
    bloggerArticleList(data){
        return request({
            url: '/web/v1/member/article/bloggerArticleList',
            method: 'post',
            data:data
        })
    },
    // 获取排行榜
    membersRank(data){
        return request({
            url: '/web/v1/rank/members',
            method: 'post',
            data:data
        })
    },
    linksList(data){
        return request({
            url: '/web/v1/links/list',
            method: 'post',
            data:data
        })
    },
    listParent(){
        return request({
            url: '/web/v1/article/category/listParent',
            method: 'post',
            data:{}
        })
    },
    getUserInfo(){
        return request({
            url: '/web/v1/member/get',
            method: 'get',
            params:{}
        })
    },
    //获取设计师信息
    getMemberInfo(_params){
        return request({
            url: '/web/v1/rank/member',
            method: 'get',
            params:_params
        })
    },
    unreadStatistics(data){
        return request({
            url: '/web/v1/member/notices/getUnreadStatistics',
            method: 'get',
            params:data
        })
    },
    //获取通知列表
    noticesList(data){
        return request({
            url: '/web/v1/member/notices/list',
            method: 'post',
            data:data
        })
    },
    configuration(){
        return request({
            url: '/web/v1/configuration/get',
            method: 'get',
            params:{}
        })
    },
    getFilter(data){
        return request({
            url: '/web/v1/search/getFilter',
            method: 'get',
            params:data
        })
    },
    explorerList(_data){
        return request({
            url: '/web/v1/member/explorer/list',
            method: 'post',
            data:_data
        })
    },
    newExplorerList(_data){
        return request({
            url: '/web/v1/member/explorer/onlyList',
            method: 'post',
            data:_data
        })
    },
    getExplorer(_id){
        return request({
            url: '/web/v1/member/explorer/get',
            method: 'get',
            params:{id:_id}
        })
    },
    editExplorer(data){
        return request({
            url: '/web/v1/member/explorer/edit',
            method: 'post',
            data:data
        })
    },
    delExplorder(_id){
        return request({
            url:'/web/v1/member/explorer/delete',
            method: 'post',
            data:{id:_id}
        })
    },
    jobList(data){
        return request({
            url:'/web/v1/job/post/list',
            method: 'post',
            data:data
        })
    },
    //获取职位详情
    getJobById(_id){
        return request({
            url:'/web/v1/job/post/get',
            method: 'get',
            params:{id:_id}
        })
    },
    getNewLoginConfig(){
        return request({
            url:'/web/v1/configuration/qrcodeInfo',
            method: 'get',
            params:{}
        })
    },
    getHotGames(params){
        return request({
            url:'/web/v1/ad/indexGameList',
            method: 'post',
            params:params
        })
    },
    getHomeNavs(){
        return request({
            url:'/web/v1/ad/indexMenuList',
            method: 'post',
            params:{}
        })
    },
    getFitCollections(){
        return request({
            url:'/web/v1/article/category/getIndexRecommendCategory',
            method: 'get',
            params:{}
        })
    },
    getHomeAdNew(){
        return request({
            url:'/web/v1/ad/indexIntroduceList',
            method: 'post',
            params:{}
        })
    },
    getArticleAdNew(){
        return request({
            url:'/web/v1/ad/getArticleIntroduce',
            method: 'get',
            params:{}
        })
    },
    //根据类型、关键词搜索条目
    globalLikeSearchKeywor(data){
        return request({
            url:'/web/v1/search/quickSearchingList',
            method: 'post',
            data:data
        })
    },
    getImgPoc(){
        return request({
            url:'/web/v1/member/ali/oss/image/policy',
            method:'get',
            data:{}
        })
    },
    getUsableRecommendList(_data){
        return request({
            url:'/web/v1/member/article/usableRecommendList',
            method:'post',
            data:_data
        })
    },
    setRepresentativeWork(_data){
        return request({
            url:'/web/v1/member/recommend/add',
            method:'post',
            data:_data
        })
    },
    getRepresentativeWorks(_data){
        return request({
            url:'/web/v1/member/recommend/list',
            method:'post',
            data:_data
        })
    },
    removeSinglePicFav(_id){
        return request({
            url:'/web/v1/member/explorer/article/delete',
            method:'post',
            data:{id:_id}
        })
    },
    getMutiplePicFavs(_data){
        return request({
            url:'/web/v1/member/explorer/article/list',
            method:'post',
            data:_data
        })
    },
    getLgCateList(){
        return request({
            url:'/web/v1/images/category/list',
            method:'post',
            data:{pageNum:1,pageSize:999,orderByColumn:'sort',isAsc:'asc'}
        })
    },
    getLgTagList(){
        return request({
            url:'/web/v1/images/category/tagList',
            method:'post',
            data:{}
        })
    },
    addLgImgs(_data){
        return request({
            url:'/web/v1/member/images/batchAdd',
            method:'post',
            data:_data,
            isMustCust:false
        })
    },
    getLgImgs(_data){
        return request({
            url:'/web/v1/member/images/list',
            method:'post',
            data:_data
        })
    },
    getLgImgsNotLogin(_data){
        return request({
            url:'/web/v1/images/list',
            method:'post',
            data:_data
        })
    },
    delLgImg(_id){
        //web/v1/member/images/delete
        return request({
            url:'/web/v1/member/images/delete',
            method:'post',
            data:{id:_id}
        })
    },
    getImgInfo(_id){
        //web/v1/member/images/get
        return request({
            url:'/web/v1/member/images/get',
            method:'get',
            params:{id:_id}
        })
    },
    getPicInfo(_data){
        //web/v1/images/get
        return request({
            url:'/web/v1/images/get',
            method:'get',
            params:_data
        })
    },
    getImgSortFilters(){
        //web/v1/images/category/filter
        return request({
            url:'/web/v1/images/category/filter',
            method:'post',
            data:{}
        })
    },
    updatePic(_data){
        //web/v1/member/images/update
        return request({
            url:'/web/v1/member/images/update',
            method:'post',
            data:_data
        })
    },
    // 游戏截图单图收藏(单图)
    addFavToSingleCollect(_data){
        return request({
            url:'/web/v1/member/collect/image/add',
            method:'post',
            data:_data
        })
    },
    // 灵感图片收藏(单图)
    favPic(_data){
        return request({
            url:'/web/v1/member/collect/images/add',
            method:'post',
            data:_data
        })
    },
    // 作品收藏(图集)
    favArticle(_data){
        return request({
            url:'/web/v1/member/collect/addByExplorer',
            method:'post',
            data:_data
        })
    },
    // 游戏截图单图取消收藏(单图)
    cancelFavToSingleCollect(_data){
        return request({
            url:'/web/v1/member/collect/image/delete',
            method:'post',
            data:_data
        })
    },
    // 游戏截图单图取消收藏(单图)
    cancelFavInpImgCollect(_url){
        return request({
            url:'/web/v1/member/collect/image/deleteByImage',
            method:'post',
            data:{url:_url}
        })
    },
    // 灵感采集取消收藏(单图)
    cancelFavLgImgCollect(_id){
        return request({
            url:'/web/v1/member/collect/images/delete',
            method:'post',
            data:{id:_id}
        })
    },
    cancelFavLgPic(_url){
        return request({
            url:'/web/v1/member/collect/images/deleteByImages',
            method:'post',
            data:{url:_url}
        })
    },
    //获取图集收藏夹数据
    getFavArticleDetail(_id){
        //web/v1/member/explorer/article/get
        return request({
            url:'/web/v1/member/explorer/article/get',
            method:'get',
            params:{id:_id}
        })
    },
    //批量取消收藏单图
    batchCancelFavSinglePic(_ids){
        return request({
            url:'/web/v1/member/collect/images/deleteByImageArray',
            method:'post',
            data:{ids:_ids}
        })
    },
    //批量取消收藏作品
    batchCancelFavMutipleArticles(_ids){
        return request({
            url:'/web/v1/member/collect/deleteByArticleArray',
            method:'post',
            data:{articleIds:_ids}
        })
    },
    //批量作品移动到
    batchCancelMoveMutipleArticles(_folderId,_ids){
        return request({
            url:'/web/v1/member/explorer/batchMoveByArticle',
            method:'post',
            data:{id:_folderId,collectIds:_ids}
        })
    },
    //批量收藏图片
    batchToFav(_explorerId,_imgIds){
        return request({
            url:'/web/v1/member/collect/image/batchAdd',
            method:'post',
            data:{explorerId:_explorerId,imageIds:_imgIds}
        })
    },
    //收藏短视频
    collectVideo(_folderId,_videoId){
        return request({
            url:'/web/v1/member/collect/video/add',
            method:'post',
            data:{explorerId:_folderId,collectId:_videoId}
        })
    },
    //修改作品收藏夹
    editArticleFolder(_data){
        return request({
            url:'/web/v1/member/explorer/article/edit',
            method:'post',
            data:_data
        })
    },
    //获取用户中心统计
    getMemberArticleAndExplorerStatistics(_uid){
        return request({
            url:'/web/v1/rank/getMemberArticleAndExplorerStatistics',
            method:'get',
            params:{userId:_uid}
        })
    },
    //获取图片被收藏最新三人
    getPicMembers(_id){
        return request({
            url:'/web/v1/collect/images/list',
            method:'post',
            data:{collectId:_id,pageNum:1,pageSize:3,orderByColumn:'createTime',isAsc:'desc'}
        })
    },
    //获取系统广告
    getSysAdv(){
        return request({
            url:'/web/v1/ad/indexDialog',
            method:'post',
            data:{}
        })
    },
    //获取收藏夹排序
    getModCates(){
        return request({
            url:'/web/v1/explorer/category/filter',
            method:'post',
            data:{}
        })
    },
    // //添加评论 type 类型0=文章1=评论2=短视频 4=图片 默认0
    // addComment(data){
    //     return request({
    //         url:'/web/v1/member/website/add',
    //         method:'post',
    //         data:data
    //     })
    // },
    getSysCommentList(data){
        return request({
            url:'/web/v1/website/list',
            method:'post',
            data:data
        })
    },
    getCommentInfo(_id){
        return request({
            url:'/web/v1/website/get',
            method:'get',
            params:{id:_id}
        })
    },
    editSysCmt(data){
        return request({
            url:'/web/v1/member/website/edit',
            method:'post',
            data:data
        })
    },
    delSysCmt(_id){
        return request({
            url:'/web/v1/member/website/delete',
            method:'get',
            params:{id:_id}
        })
    },
    // imgToImgUpload(data){
    //     return request({
    //         url:'/web/v1/article/imageSearchByImage',
    //         method:'post',
    //         headers:{
    //             'Content-Type':'multipart/form-data'
    //         },
    //         data:data,
    //         isMustCust:false
    //     })
    // },
    imgToImgUpload(_data){
        let newData={
            // table_name:'default',
            page:_data.get('pageNum'),
            pageSize:_data.get('pageSize')
        };
        let data=new FormData();
        let allObj={
            url:'/api/default?'+Qs.stringify(newData),
            method:'post',
            isMustCust:false
        }
        if(!newData.hash){
            data.append('page',_data.get('pageNum'));
            data.append('pageSize',_data.get('pageSize'));
            data.append('image',_data.get('image'));
            allObj.headers={
                'Content-Type':'multipart/form-data'
            }
            allObj.data=data;
        }

        return request(allObj)
    },
    getRecommendPics(){
        return request({
            url:'/web/v1/links/searchRecommend',
            method:'post',
            params:{pageNum:1,pageSize:4}
        })
    },
    uploadImg(_data){
        return request({
            url:'/web/v1/member/upload/image',
            method:'post',
            headers:{
                'Content-Type':'multipart/form-data'
            },
            data:_data,
            isMustCust:false
        })
    },
    imgInfo(_src){
        return request({
            url:'/web/v1/images/detail',
            method:'get',
            params:{
                content:_src,
                currentUserId:localStorage.getItem('userId')
            }
        })
    },
    imgNewInfo(_id){
        let _params={
            imagesId:_id
        }
        if(localStorage.getItem('token')){
            _params.currentUserId=localStorage.getItem('userId');
        }
        return request({
            url:'/web/v1/images/detail/v2',
            method:'get',
            params:_params
        })
    },
    beSimilarList(_id,_params){
        return request({
            url:'/api/default/'+_id,
            method:'get',
            params:_params
        })
    },
    getVideoCates(){
        return request({
            url:'/web/v1/sort/video/category',
            method:'get',
            params:{}
        })
    },
    getArticleById(_id){
        let _params={}
        if(_id){
            _params.id=_id;
        }
        if(localStorage.getItem('userId')){
            _params.userId=localStorage.getItem('userId');
        }
        return request({
            url:'/web/v1/article/get',
            method:'get',
            params:_params
        })
    },
    login(_data){
        return request({
            url:'/web/v1/account/loginByPwd',
            method:'post',
            data:_data
        })
    },
    loginByCode(_data){
        return request({
            url:'/web/v1/account/loginBySms',
            method:'post',
            data:_data
        })
    },
    getAttributes(_data){
        return request({
            url:'/web/v1/article/attribute/list',
            method:'post',
            data:_data
        })
    },
    addArticle(_data){
        return request({
            url:'/web/v1/member/article/add2',
            method:'post',
            headers:{
                'Content-Type':'application/json;charset=utf-8'
            },
            data:JSON.stringify(_data)
        })
    },
    editArticle(_data){
        return request({
            url:'/web/v1/member/article/edit2',
            method:'post',
            headers:{
                'Content-Type':'application/json;charset=utf-8'
            },
            data:JSON.stringify(_data)
        })
    },
    fansList(_data){
        return request({
            url:'/web/v1/member/fans/list',
            method:'post',
            data:_data
        })
    },
    //举报  type 0系统默认 1 作品 2私信 3图片 4举报视频
    addFeedBack(_data){
        return request({
            url:'/web/v1/feedback/add',
            method:'post',
            data:_data
        })
    },
    addShortVideo(_data){
        return request({
            url:'/web/v1/member/sort/video/add',
            method:'post',
            data:_data
        })
    },
    editShortVideo(_data){
        return request({
            url:'/web/v1/member/sort/video/update',
            method:'post',
            data:_data
        })
    },
    getVideo(_id){
        return request({
            url:'/web/v1/sort/video/get',
            method:'get',
            params:{id:_id}
        })
    },
    delShortVideo(_id){
        return request({
            url:'/web/v1/member/sort/video/del?id='+_id,
            method:'get'
        })
    },
    // 获取短视频列表
    shortVideoList(_params){
        return request({
            url:'/web/v1/member/sort/video/list',
            method:'get',
            params:_params
        })
    },
    shortVideoAttributes(_data){
        return request({
            url:'/web/v1/sort/video/publishAttribute',
            method:'post',
            data:_data
        })
    },
    editUserInfo(_data){
        return request({
            url:'/web/v1/member/edit',
            method:'post',
            data:_data
        })
    },
    //关注人
    followTo(_userId){
        return request({
            url:'/web/v1/member/fans/subscribe',
            method:'post',
            data:{bloggerId:_userId}
        })
    },
    //取关人
    cancelFollowTo(_userId){
        return request({
            url:'/web/v1/member/fans/unsubscribe',
            method:'post',
            data:{bloggerId:_userId}
        })
    },
    myAttentions(_data){
        return request({
            url:'/web/v1/member/fans/myBlogger',
            method:'post',
            data:_data
        })
    },
    // 获取最新点赞
    getLastPraiseList(_data){
        return request({
            url:'/web/v1/praise/list',
            method:'post',
            data:_data
        })
    },
    // 删除评论
    delComment(_id){
        return request({
            url:'/web/v1/member/comment/delete',
            method:'post',
            data:{id:_id}
        })
    },
    // 获取相似推荐
    getRecommends(_params){
        return request({
            url:'/web/v1/article/getRecommendByArticleId',
            method:'get',
            params:_params
        })
    },
    // 获取评论
    getComments(_data){
        return request({
            url:'/web/v1/comment/list',
            method:'post',
            data:_data
        })
    },
    //评论 添加评论 type 类型0=文章1=评论2=短视频 4=图片 默认0
    addComment(_data){
        return request({
            url:'/web/v1/member/comment/add',
            method:'post',
            data:_data
        })
    },
    //点赞
    addPraise(_data){
        return request({
            url:'/web/v1/member/praise/add',
            method:'post',
            data:_data
        })
    },
    //批量点赞
    batchAddPraise(_data){
        return request({
            url:'/web/v1/member/praise/batchAdd',
            method:'post',
            data:_data
        })
    },
    //取消点赞
    delPraise(_data){
        return request({
            url:'/web/v1/member/praise/delete',
            method:'post',
            data:_data
        })
    },
    //获取私信列表
    getPrivateGroups(){
        return request({
            url:'/web/v1/member/messages/group',
            method:'get',
            params:{}
        })
    },
    //获取私信内容列表
    getPrivateMessageList(_data){
        return request({
            url:'/web/v1/member/messages/list',
            method:'post',
            data:_data
        })
    },
    //发送私信
    sendPrivateMsg(_data){
        return request({
            url:'/web/v1/member/messages/send',
            method:'post',
            data:_data
        })
    },
    //屏蔽TA
    shieldTo(_id){
        return request({
            url:'/web/v1/member/messages/hide',
            method:'post',
            data:{parentId:_id}
        })
    },
    //删除对话
    delPrivate(_id){
        return request({
            url:'/web/v1/member/messages/delete',
            method:'post',
            data:{parentId:_id}
        })
    },
    //获取举报类型
    getFeedBackTypes(_params){
        return request({
            url:'/web/v1/feedback/getFeedbackTypeList',
            method:'get',
            params:_params
        })
    },
    //获取设计师发布内容
    getMemberArticles(_data){
        return request({
            url:'/web/v1/article/listByMemberOrTeam',
            method:'post',
            data:_data
        })
    },
    //获取用户上传的图片列表
    getUserImgs(_data){
        return request({
            url:'/web/v1/member/images/list',
            method:'post',
            data:_data
        })
    },
    //视频收藏夹列表
    getVideoFolders(_params){
        return request({
            url:'/web/v1/member/explorer/video/list',
            method:'get',
            params:_params
        })
    },
    //获取用户已收藏所有图片
    getUserCollectsByUserId(_userId){
        return request({
            url:'/api/user_collect/'+_userId,
            //url:'/api/similar/'+_id,
            method:'get',
            params:{}
        })
    },
    //创建图片集收藏夹
    createFavorites(_data){
        return request({
            url:'/web/v1/member/explorer/article/add',
            method:'post',
            data:_data
        })
    },
    //创建单图收藏夹
    createSinglePicFav(_data){
        return request({
            url:'/web/v1/member/explorer/add',
            method:'post',
            data:_data
        })
    },
    //创建视频收藏夹
    createVideoFolder(_data){
        return request({
            url:'/web/v1/member/explorer/video/add',
            method:'post',
            data:_data
        })
    },
    //批量单图移动到
    batchCancelMoveSinglePic(_folderId,_ids){
        return request({
            url:'/web/v1/member/explorer/batchMoveByImage',
            method:'post',
            data:{id:_folderId,collectIds:_ids}
        })
    },
    //获取单图收藏夹列表
    getNewFavFolds(data){
        return request({
            url:'/web/v1/member/explorer/onlyList',
            method:'post',
            data:data
        })
    },
    //获取点赞内容列表
    getMemberPraiseList(data){
        return request({
            url:'/web/v1/member/praise/list',
            method:'post',
            data:data
        })
    },
    //删除发布内容
    delArticle(data){
        return request({
            url:'/web/v1/member/article/delete',
            method:'post',
            data:data
        })
    },
    //外包属性分组
    getJobAttribute(_data){
        return request({
            url:'/web/v1/job/attribute/group',
            method:'post',
            data:_data
        })
    },
    // //关注人
    // followFolder(_folderId){
    //     return request({
    //         url:'/web/v1/member/fans/subscribe',
    //         method:'post',
    //         data:{bloggerId:_folderId,type:3}
    //     })
    // },
    // //取关人
    // cancelFollowFolder(_folderId){
    //     return request({
    //         url:'/web/v1/member/fans/unsubscribe',
    //         method:'post',
    //         data:{bloggerId:_folderId,type:3}
    //     })
    // },
    //关注文件夹
    followFolder(_data){
        return request({
            url:'/web/v1/member/fans/explorer/subscribe',
            method:'post',
            data:_data
        })
    },
    //取关文件夹
    cancelFollowFolder(_data){
        return request({
            url:'/web/v1/member/fans/explorer/unsubscribe',
            method:'post',
            data:_data
        })
    },
    //按关键词搜索
    globalSearchList(_data){
        return request({
            url:'/web/v1/search/list',
            method:'post',
            data:_data
        })
    },
    //发布职位
    addJob(_data){
        return request({
            url:'/web/v1/member/job/post/add',
            method:'post',
            data:_data
        })
    },
    delJob(_id){
        return request({
            url:'/web/v1/member/job/post/delete',
            method: 'post',
            data:{id:_id}
        })
    },
    editJob(_data){
        return request({
            url:'/web/v1/member/job/post/edit',
            method: 'post',
            data:_data
        })
    },
    //我发布的职位
    myJobs(_data){
        return request({
            url:'/web/v1/member/job/post/list',
            method:'post',
            data:_data
        })
    },
    //获取验证码
    sendSms(_params){
        return request({
            url:'/web/v1/account/sendSms',
            method:'get',
            params:_params
        })
    },
    //修改密码
    modyfiPwd(_data){
        return request({
            url:'/web/v1/member/resetPassword',
            method:'post',
            data:_data
        })
    },
    //验证输入的验证码
    checkCode(_params){
        return request({
            url:'/web/v1/account/verifyCode',
            method:'get',
            params:_params
        })
    },
    //绑定邮箱
    bindEmail(_data){
        return request({
            url:'/web/v1/member/bindEmail',
            method:'post',
            data:_data
        })
    },
    //绑定手机
    bindPhone(_data){
        return request({
            url:'/web/v1/member/bindPhone',
            method:'post',
            data:_data
        })
    },
    //获取第三方绑定
    getThirdMaps(_params){
        return request({
            url:'/web/v1/member/third/map',
            method:'get',
            params:_params
        })
    },
    //绑定第三方
    bindThirdAcc(_data){
        return request({
            url:'/web/v1/member/third/bind',
            method:'post',
            data:_data
        })
    },
    //取消绑定第三方
    cancelBindThirdAcc(_data){
        return request({
            url:'/web/v1/member/third/unbind',
            method:'post',
            data:_data
        })
    },
    //短视频综合列表
    videoList(_params){
        let token=localStorage.getItem('token');
        // if(token){
        //     _params.userId=localStorage.getItem('userId');
        // }
        return request({
            url:'/web/v1/sort/video/list',
            method:'get',
            params:_params
        })
    },
	//首页tab导航
	categoryList(){
	    return request({
	        url:'/web/v1/article/category/getIndexRecommendCategory',
	        method:'get',
	        data:{}
	    })
	},
	//我的点赞
	myLikeList(data){
	    return request({
	        url:'/web/v1/member/praise/list',
	        method:'post',
	        data:data
	    })
	},
    // 第三方登录
    thirdLogin(data){
        return request({
	        url:'/web/v1/account/registerByThird',
	        method:'post',
	        data:data
	    })
    },
    // 打表情
    addEmoji(data){
        return request({
	        url:'/web/v1/member/praise/addEmoji',
	        method:'post',
	        data:data
	    })
    },
    // 查表情统计
    queryImgEmojCount(_id){
        return request({
	        url:'/web/v1/search/emoji',
	        method:'get',
	        params:{pageNum:1,pageSize:5,commentId:_id}
	    })
    },
    // 给图片追加标签
    addImgTag(data){
        return request({
	        url:'/web/v1/member/images/updateImages',
	        method:'post',
	        data:data
	    })
    },
    // 设置消息已读
    setMsgRead(_id){
        if(_id){
            return request({
                url:'/web/v1/member/notices/setRead',
                method:'get',
                params:{noticeId:_id}
            })
        }else{
            return request({
                url:'/web/v1/member/notices/setRead',
                method:'get'
            })
        }
    },
    putGameCall(_liveInteractiveId,_liveInteractiveType){
        return request({
	        url:'/web/v1/member/live/interactive/add',
	        method:'post',
	        data:{liveInteractiveId:_liveInteractiveId,type:1,liveInteractiveType:_liveInteractiveType}
	    })
    },
    getGameCallCount(_liveInteractiveId){
        return request({
	        url:'/web/v1/live/interactive/total',
	        method:'get',
	        params:{liveInteractiveId:_liveInteractiveId}
	    })
    },
    getRecommendUsers(_params){
        return request({
	        url:'/web/v1/member/fans/recommend',
	        method:'get',
	        params:_params
	    })
    },
    getRecommendFolders(_params){
        return request({
	        url:'/web/v1/member/fans/recommendExplorer',
	        method:'get',
	        params:_params
	    })
    },
    getOcrsByGame(_articleId,_keyword){
        return request({
	        url:'/web/v1/article/searchByArticle',
	        method:'get',
	        params:{articleId:_articleId,keyword:_keyword}
	    })
    },
    getCallPersons(_gameId){
        return request({
	        url:'/web/v1/comment/callList',
	        method:'post',
	        params:{
                commentId:_gameId,
                pageSize:6,
                pageNum:1,
                orderByColumn:'createTime',
                isAsc:'desc'
            }
	    })
    },
    getCallStatistics(_gameId){
        return request({
	        url:'/web/v1/comment/getStatistics',
	        method:'get',
	        params:{commentId:_gameId}
	    })
    },
    // 获取为你推荐
    getTjList(_uid,_params){
        let params=``
        let images=`{images(first:${_params.pageSize},interest:${_uid}){total`;
        if(_params.last)
            images=`{images(first:${_params.pageSize},interest:${_uid},after:${_params.last}){total`;
        let list=`
        list{article_category_top_id
            collect_count
            comment_num
            content
            create_time
            description
            height
            id
            praise_count
            rank
            remark
            tags
            update_time
            width `
        let article=`
        article{create_time
                id
                orientation
                tags
                title
                update_time}`
        let user=`user{
                    avatar
                    create_time
                    id
                    price
                    rank
                    update_time
                    user_name
                }`
        let end=`}}}`
        params=params.concat(images).concat(list).concat(article).concat(user).concat(end);
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    // 截图列表
    searchImgs(_queryParams){
        let query=Object.assign({},_queryParams);
        let params=``
        let images=`{images(first:${query.pageSize}`;

        let imgdesc=[];
        if(query.paramImagesDescFunc)
        {
            imgdesc=imgdesc.concat(query.paramImagesDescFunc.split(','));
        }
        if(query.paramImagesDescMaterial)
        {
            imgdesc=imgdesc.concat(query.paramImagesDescMaterial.split(','));
        }
        if(imgdesc.length>0){
            images=images.concat(`,images_desc:"${imgdesc.join(',')}"`)
        }
        if(query.tags)//主题
            images=images.concat(`,article_tags:"${query.tags}"`)
        if(query.categoryIds)//类型
            images=images.concat(`,category_id:"${query.categoryIds}"`)
        if(query.style)//风格
            images=images.concat(`,style:"${query.style}"`)
        if(query.imageColor)//颜色
        {
            images=images.concat(`,color:"${query.imageColor}:${query.colorrto}"`)
        }
        if(query.explorer_id)//文件夹id
            images=images.concat(`,explorer_id:${query.explorer_id}`)
        if(query.article_id)//游戏id
            images=images.concat(`,article_id:${query.article_id}`)
        if(query.similar)//相似图id
            images=images.concat(`,similar:${query.similar}`)
        if(query.praise)//某个人所喜欢的图
            images=images.concat(`,praise:${query.praise}`)
        if(query.era)//年份
            images=images.concat(`,era:"${query.era}"`)
        if(query.device)//平台
            images=images.concat(`,device:"${query.device}"`)
        if(query.follower)//当前登录人（所关注的用户的所有图）
            images=images.concat(`,follower:${query.follower}`)
        if(query.user_id)//指定查询所关注的某个用户
            images=images.concat(`,user_id:${query.user_id}`)
        if(query.interest)//当前登录者（推荐）
            images=images.concat(`,interest:${query.interest}`)
        if(query.rank)
            images=images.concat(`,rank:"${query.rank}"`)
        if(query.orderByColumn)
        {
            if(query.orderByColumn=='createTime'||query.orderByColumn=='create_time')
                query.orderByColumn='id';
            if(query.orderByColumn=='see')
                query.orderByColumn='day_rank';
            images=images.concat(`,sort:"${query.orderByColumn}"`)
        }
        if(query.orientation)
            images=images.concat(`,orientation:"${query.orientation}"`)
        if(query.title)
            images=images.concat(`,text:"${query.title}"`)
        if(query.last)
            images=images.concat(`,after:${query.last}`)
        if(query.isAsc)
        {
            query.isAsc=query.isAsc.toUpperCase();
            images=images.concat(`,order:${query.isAsc}`)
        }
        images=images.concat(`){total`)
        let list=`
        list{${query.article_id?'activity':''}
            collect
            collect_count
            create_time
            description
            height
            id
            praise
            collect_id
            praise_count
            tags
            update_time
            width`
        let article=`
        article{
                id
                title
                }`
        let user=`user{
                    avatar
                    create_time
                    id
                    price
                    rank
                    update_time
                    user_name
                }`
        let text='';
        images.concat
        if(query.title)
            text=`text(text:"${query.title}") {
                confidence
                coordinate
                text
            }`
        let end=`}}}`
        params=params.concat(images).concat(list).concat(article).concat(text).concat(end);
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    // 获取游戏首页排行榜
    getGameRank(_params){
        let params=`{games(first:1,order:DESC,sort:"${_params.sort}"`
        if(_params.style){
            params=params.concat(`,style:"${_params.style}"`)
        }
        params=params.concat(`){
                        list {
                            create_time
                            era
                            id
                            title
                            update_time
                        }
    }}`);
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    // 获取首页排行榜
    getHomeRank(_params){
        let params=`{works(sort:"${_params.sort}",order:DESC,first:1){
                        list {
                            create_time
                            id
                            title
                            update_time
                        }
    }}`
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    beSimilarList2(_id,_params){
        let params=``
        let images=`{images(first:${_params.pageSize},similar:${_id}){total`;
        if(_params.last)
            images=`{images(first:${_params.pageSize},similar:${_id},after:${_params.last}){total`;
        let list=`
        list{article_category_top_id
            collect_count
            comment_num
            content
            create_time
            description
            height
            id
            praise_count
            rank
            remark
            tags
            update_time
            width `
        let article=`
        article{create_time
                id
                orientation
                tags
                title
                update_time}`
        let user=`user{
                    avatar
                    create_time
                    id
                    price
                    rank
                    update_time
                    user_name
                }`
        let end=`}}}`
        params=params.concat(images).concat(list).concat(article).concat(user).concat(end);
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    getImgTextsById(_id){
        let params=`{image(id:${_id}){text{text}}}`;
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    getTextCount(_id){
        let params=`{
            games(id:${_id}){
                list{
                    text_count
                    }
                }
            }`;
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    getTexts(_id){
        let params=`{
            images(article_id: ${_id}) {
                list {
                    text {
                        text
                    }
                }
            }
        }`;
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    getTextCountAndTexts(_id){
        let params=`{
            games(id: ${_id}) {
                list {
                    text_list
                    text_count
                }
            }
        }`;
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    // 获取排行榜
    getRanks(_type,_params){
        let params=`{${_type}(first:${_params.pageSize}`
        
        if(_params.sort){
            params=params.concat(`,order:DESC,sort:"${_params.sort}"`)
        }
        if(_params.last){
            params=params.concat(`,after:${_params.last}`)
        }
        if(_params.style){
            params=params.concat(`,style:"${_params.style}"`)
        }
        if(_type=='collections'){
            params=params.concat(`){
                            list {
                                content
                                create_time
                                fan
                                fans
                                id
                                num
                                thumbnail
                                title
                                type
                                views
                                covers {
                                    id
                                    type
                                }
                                update_time
                            }
            }}`);
        }else if(_type=='works'||_type=='articles'){
            params=params.concat(`){
                            list {
                                collect
                                collect_count
                                create_time
                                id
                                tags
                                views
                                praise
                                praise_count
                                title
                                update_time
                            }
            }}`);
        }else if(_type=='images'){
            params=params.concat(`){
                            list {
                                collect
                                collect_count
                                collect_id
                                comment_num
                                content
                                views
                                create_time
                                description
                                height
                                id
                                praise
                                praise_count
                                rank
                                remark
                                tags
                                update_time
                                width
                                emoji1
                                emoji2
                                emoji3
                                emoji4
                                emoji5
                                article {
                                    title
                                }
                            }
            }}`);
        }else{
            if(_params.ishome){
                params=params.concat(`,rank:"首页推荐"){
                                list {
                                    create_time
                                    era
                                    device
                                    category_id
                                    style
                                    id
                                    title
                                    views
                                    update_time
                                    praise
                                    praise_count
                                    collect
                                    collect_count
                                    image_count
                                    user {
                                        avatar
                                        create_time
                                        id
                                        update_time
                                        user_name
                                    }
                                }
                }}`);
            }else{
                params=params.concat(`,rank:"首页推荐"){
                                list {
                                    create_time
                                    era
                                    device
                                    category_id
                                    style
                                    id
                                    title
                                    views
                                    update_time
                                    praise
                                    praise_count
                                    collect
                                    collect_count
                                }
                }}`);
            }
        }
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    },
    getHomeHots(_params){
        let params=`{
            searchs(first: ${_params.pageSize}) {
                list {
                    name
                }
            }
        }`;
        return request({
	        url:'/api',
	        method:'get',
            params:{query:params}
	    })
    }
}